extends HBoxContainer


var drama_data

signal edit(drama_data)
signal delete(drama_data)

const type_text = ["阻碍剧本", "普通剧本"]


func _ready():
	pass # Replace with function body.



func set_data(drama_data):
	self.drama_data = drama_data
	$id.text = str(drama_data["id"])
	$name.text = drama_data["name"]
	$type.text = type_text[drama_data["type"]]
	
	$name.hint_tooltip = "描述:\n%s\n下一剧本ID:\n %s" % [drama_data.get("remark", ""), drama_data["next"]]
	
	


func _on_edit_button_up():
	emit_signal("edit", drama_data)
	pass 


func _on_delete_button_up():
	emit_signal("delete", drama_data)
